
::selection {
  background: $selection-bg;
  color: $selection-color;
}

body {
  position: relative; // Required by scrollspy
  font-family: $font-family-base;
  font-size: $font-size-base;
  line-height: $line-height-base;
  color: $text-color;
  background: $body-bg-color;

  @include mobile() { padding-right: 0 !important; }
  @include tablet() { padding-right: 0 !important; }
  @include desktop-large() { font-size: $font-size-large; }
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  font-weight: bold;
  line-height: 1.5;
  font-family: $font-family-headings;
}

h2, h3, h4, h5, h6 { margin: 20px 0 15px; }

@for $headline from 1 through 6 {
  h#{$headline} {
    font-size: $font-size-headings-base - $font-size-headings-step * $headline;
  }

  @include mobile() {
    h#{$headline} {
      font-size: $font-size-headings-base - $font-size-headings-step * $headline - 4px;
    }
  }
}

p { margin: 0 0 25px 0; }

a {
  color: $link-color;
  text-decoration: none;
  border-bottom: 1px solid $grey-dark;
  word-wrap: break-word;

  &:hover {
    color: $link-hover-color;
    border-bottom-color: $link-decoration-hover-color;
  }
}

blockquote {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  margin: auto;
  max-width: 100%;
  height: auto;
}


hr {
  margin: 40px 0;
  height: 3px;
  border: none;
  background-color: $gray-lighter;
  background-image: repeating-linear-gradient(
    -45deg,
    white,
    white 4px,
    transparent 4px,
    transparent 8px
  );
}

blockquote {
  padding: 0 15px;
  color: $grey-dim;
  border-left: 4px solid $gray-lighter;

  cite::before {
    content: "-";
    padding: 0 5px;
  }
}

dt { font-weight: $font-weight-bolder; }

dd {
  margin: 0;
  padding: 0;
}
